{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 基于MindQuantum的Grover搜索算法和龙算法\n",
    "\n",
    "[![下载Notebook](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/resource/_static/logo_notebook.png)](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/notebook/master/mindquantum/zh_cn/mindspore_grover_search_algorithm.ipynb)&emsp;\n",
    "[![下载样例代码](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/resource/_static/logo_download_code.png)](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/notebook/master/mindquantum/zh_cn/mindspore_grover_search_algorithm.py)&emsp;\n",
    "[![查看源文件](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/resource/_static/logo_source.png)](https://gitee.com/mindspore/docs/blob/master/docs/mindquantum/docs/source_zh_cn/grover_search_algorithm.ipynb)\n",
    "\n",
    "## 概述\n",
    "\n",
    "如果你听过量子计算，那么你一定听说过Grover搜索算法。1996年，Lov Grover \\[1\\] 提出了Grover搜索算法，它是一种利用量子状态的叠加性进行并行计算并实现加速的算法。Grover搜索算法被公认为是继Shor算法后的第二大量子算法，也是第一个被完整的实验实现的量子算法，它解决的是无序数据库搜索问题。1997年，Bennett \\[2\\] 等人证明，对于非结构化的量子搜索问题，至少需要$\\Omega(\\sqrt{N})$​次量子查询，因此Grover搜索算法对于该问题是渐进意义下的最优算法。\n",
    "\n",
    "无序数据库搜索问题（Unordered  Database Search problem）就是从一个海量元素的无序数据库中，找到某些满足要求的元素。由于数据库中元素的数量是巨大的且这些元素是无序排列的，所以，要验证给定的元素是否满足要求很容易，但反过来，要找到这些元素却不是一件容易的事。\n",
    "\n",
    "求解无序数据库搜索问题（不妨假设只有一个目标搜索数据），经典算法所需的时间复杂度为$\\mathcal{O}(N)$，而Grover搜索算法所需的时间复杂度仅为$\\mathcal{O}(\\sqrt{N})$，相比经典算法具有平方加速，展示了量子计算的强大性能。此外，Grover搜索算法中用到的振幅扩大技巧，对许多启发式的经典搜索算法可以实现加速，因而具有广泛的应用。\n",
    "\n",
    "本文档将会介绍Grover搜索算法的基本原理，以及通过两个具体的小例子来展示如何利用MindQuantum实现该算法。\n",
    "\n",
    "## 问题描述\n",
    "\n",
    "我们需要在一组无序的$N$元素集合（数据库）中进行搜索。将数据库中的元素与索引（从$0$到$N-1$之间的整数）建立一一对应，我们关注于搜索这些元素的索引。考虑将该搜索问题表示为一个关于输入$x$的函数$f(x)$，其中$x$为$0$到$N-1$之间的整数。那么，函数$f$定义为：\n",
    "\n",
    "$$\n",
    "\\begin{equation}\n",
    "f(x)=\\begin{cases}0,x\\neq x_{target}\\\\\\\\\n",
    "1,x=x_{target}\n",
    "\\end{cases}\n",
    "\\end{equation}.\n",
    "$$\n",
    "\n",
    "不失一般性，假设$N=2^n$​，那么在量子系统中，索引以量子态$|0\\rangle,|1\\rangle,...,|N-1\\rangle$​（或$|00...0\\rangle,|00...1\\rangle,...,|11...1\\rangle$​）表示，也即我们可以使用$n$​个量子比特存储这些索引。\n",
    "\n",
    "同时假设搜索问题只有一个目标态$|\\omega\\rangle$。Grover搜索算法的目标就是以极大的概率将$|\\omega\\rangle$搜索出来。\n",
    "\n",
    "## Grover搜索算法的基本原理\n",
    "\n",
    "Grover搜索算法的基本原理：首先通过`Hadamard`门产生均匀叠加态，然后反复调用Grover迭代（或称为$G$算子），以放大目标项的概率振幅同时抑制非目标项的概率振幅（该方法称之为振幅放大），最后对末态进行测量，那么就能以极大的概率得到目标态$|\\omega\\rangle$​​。\n",
    "\n",
    "Grover搜索算法主要包括以下步骤：\n",
    "\n",
    "- Step 1：数据库初始化\n",
    "\n",
    "  对$|0\\rangle^{\\otimes n}$​​​​执行$H^{\\otimes n}$​​​​​操作，使得数据库被初始为一个均匀叠加态，即\n",
    "\n",
    "  $$\n",
    "  |\\psi_0\\rangle=H^{\\otimes n}|0\\rangle^{\\otimes n}=\\frac{1}{\\sqrt{N}}\\sum_{i=0}^{N-1}|i\\rangle.\n",
    "  $$\n",
    "\n",
    "- Step 2：Grover迭代\n",
    "\n",
    "  Grover迭代又可以分解为四步：\n",
    "\n",
    "  1. 执行Oracle算子$U_{\\omega}$​，翻转目标态$|\\omega \\rangle$​​​​​的相位\n",
    "\n",
    "    为了将需要寻找的数据和其它的数据区别开，最简单的方法就是翻转目标态的相位（增加一个负号），此时我们需要构造一个Oracle算子$U_{\\omega}$，其作用如下：\n",
    "\n",
    "    $$\n",
    "    \\begin{equation}\n",
    "    U_{\\omega}|x\\rangle=\\begin{cases}\n",
    "    &|x\\rangle,x\\neq \\omega&\\\\\\\\\n",
    "    -&|x\\rangle,x=\\omega&\n",
    "    \\end{cases}\n",
    "    \\end{equation}.\n",
    "    $$\n",
    "\n",
    "    由于当$x=\\omega$​时，$f(\\omega)=1$​，那么$U_{\\omega}$​​的作用还可以表示成：\n",
    "\n",
    "    $$\n",
    "    U_{\\omega}|x\\rangle=(-1)^{f(x)}|x\\rangle,\n",
    "    $$\n",
    "\n",
    "    其矩阵表达式为\n",
    "\n",
    "    $$\n",
    "    \\begin{equation}\n",
    "    U_{\\omega}=\n",
    "    \\left[\n",
    "    \\begin{array}{ccc}\n",
    "         (-1)^{f(0)} & 0           & \\dots  & 0            \\\\\\\\\n",
    "         0           & (-1)^{f(1)} & \\dots  & 0            \\\\\\\\\n",
    "         \\vdots      & \\vdots      & \\ddots & \\vdots       \\\\\\\\\n",
    "         0           & 0           & \\dots  & (-1)^{f(N-1)}\n",
    "    \\end{array}\n",
    "    \\right]\n",
    "    \\end{equation}.\n",
    "    $$\n",
    "\n",
    "  2. 执行$H^{\\otimes n}$操作\n",
    "\n",
    "    对$n$位量子比特执行$H^{\\otimes n}$操作。\n",
    "\n",
    "  3. 执行条件相移算子$P$\n",
    "\n",
    "    条件相移算子$P$能使$|0\\rangle$​态以外的每个态的相位都翻转，其作用如下：\n",
    "\n",
    "    $$\n",
    "    \\begin{equation}\n",
    "    P|x\\rangle=\\begin{cases}&|0\\rangle,x= 0&\\\\\\\\\n",
    "    -&|x\\rangle,x\\neq0&\n",
    "    \\end{cases}\n",
    "    \\end{equation}.\n",
    "    $$\n",
    "\n",
    "    其矩阵表达式为\n",
    "\n",
    "    $$\n",
    "    \\begin{equation}\n",
    "    P = 2(|0\\rangle\\langle0|)^{\\otimes n} - I_n =\n",
    "    \\left[\n",
    "    \\begin{array}{ccc}\n",
    "         1      & 0      & \\dots  & 0            \\\\\\\\\n",
    "         0      & -1     & \\dots  & 0            \\\\\\\\\n",
    "         \\vdots & \\vdots & \\ddots & \\vdots       \\\\\\\\\n",
    "         0      & 0      & \\dots  & -1\n",
    "    \\end{array}\n",
    "    \\right]\n",
    "    \\end{equation}.\n",
    "    $$\n",
    "\n",
    "  4. 再次执行$H^{\\otimes n}$操作\n",
    "\n",
    "  至此，完整的$G$算子可以表示为\n",
    "\n",
    "  $$\n",
    "  G = H^{\\otimes n} [2(|0\\rangle\\langle0|)^{\\otimes n} - I_n] H^{\\otimes n} U_{\\omega}.\n",
    "  $$\n",
    "\n",
    "  注意：$G$算子需要迭代的次数为\n",
    "\n",
    "  $$\n",
    "  r = \\left[ \\frac{\\pi}{4} \\sqrt{\\frac{N}{M}} \\right] \\sim O(\\sqrt{N}),\n",
    "  $$\n",
    "\n",
    "  其中，M表示目标态的个数。\n",
    "\n",
    "- Step 3：测量\n",
    "\n",
    "  对末态进行$\\\\{|0\\rangle,|1\\rangle\\\\}$基测量，就能以极大的概率得到目标态$|\\omega \\rangle$。\n",
    "\n",
    "Grover搜索算法的完整量子线路模型如下所示：\n",
    "\n",
    "![grover algorithm circuit](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/docs/mindquantum/docs/source_zh_cn/images/grover_algorithm_circuit.png)\n",
    "\n",
    "## 构造翻转量子比特相位的酉算子\n",
    "\n",
    "通过上述介绍，我们发现，Grover搜索算法中最关键的部分就是存在可以翻转量子比特相位的酉算子，Oracle算子$U_{\\omega}$可以翻转目标态的相位，条件相移算子$P$可以翻转$|0\\rangle$态以外的每个态的相位。\n",
    "\n",
    "接下来，我们将构造可以翻转某一位量子比特相位的酉算子，定义如下："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "from mindquantum.core.circuit import Circuit\n",
    "from mindquantum.core.gates import Z\n",
    "\n",
    "def bitphaseflip_operator(phase_inversion_qubit, n_qubits):   # 定义可以翻转某一位量子比特相位的函数\n",
    "    s = [1 for i in range(1 << n_qubits)]\n",
    "    for i in phase_inversion_qubit:\n",
    "        s[i] = -1\n",
    "    if s[0] == -1:\n",
    "        for i in range(len(s)):\n",
    "            s[i] = -1 * s[i]\n",
    "    circuit = Circuit()\n",
    "    length = len(s)\n",
    "    cz = []\n",
    "    for i in range(length):\n",
    "        if s[i] == -1:\n",
    "            cz.append([])\n",
    "            current = i\n",
    "            t = 0\n",
    "            while current != 0:\n",
    "                if (current & 1) == 1:\n",
    "                    cz[-1].append(t)\n",
    "                t += 1\n",
    "                current = current >> 1\n",
    "            for j in range(i + 1, length):\n",
    "                if i & j == i:\n",
    "                    s[j] = -1 * s[j]\n",
    "    for i in cz:\n",
    "        if i:\n",
    "            if len(i) > 1:\n",
    "                circuit += Z.on(i[-1], i[:-1])\n",
    "            else:\n",
    "                circuit += Z.on(i[0])\n",
    "\n",
    "    return circuit"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "现在， `bitphaseflip_operator()` 函数就可以实现翻转某一位量子比特的相位，只需要输入需要翻转相位的目标量子态和量子比特总数即可。\n",
    "\n",
    "举个例子，我们现在生成3​​量子比特的均匀叠加态，运行如下代码："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "image/svg+xml": "<div class=\"nb-html-output output_area\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"156.8\" height=\"200\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n<rect x=\"0\" y=\"0\" width=\"156.8\" height=\"200\" fill=\"#ffffff\" />\n<text x=\"20.0\" y=\"40.0\" font-size=\"16px\" dominant-baseline=\"middle\" text-anchor=\"start\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#252b3a\" >\nq0:\n </text>\n<text x=\"20.0\" y=\"100.0\" font-size=\"16px\" dominant-baseline=\"middle\" text-anchor=\"start\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#252b3a\" >\nq1:\n </text>\n<text x=\"20.0\" y=\"160.0\" font-size=\"16px\" dominant-baseline=\"middle\" text-anchor=\"start\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#252b3a\" >\nq2:\n </text>\n<line x1=\"48.8\" x2=\"136.8\" y1=\"40.0\" y2=\"40.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<line x1=\"48.8\" x2=\"136.8\" y1=\"100.0\" y2=\"100.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<line x1=\"48.8\" x2=\"136.8\" y1=\"160.0\" y2=\"160.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n\n<rect x=\"72.8\" y=\"20.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"92.8\" y=\"40.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"72.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"92.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"72.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"92.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n</svg></div>",
      "text/plain": [
       "<mindquantum.io.display.circuit_svg_drawer.SVGCircuit at 0x7f2ee6af39a0>"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# pylint: disable=W0104\n",
    "from mindquantum.core.gates import H\n",
    "from mindquantum.core.circuit import UN\n",
    "from mindquantum.simulator import Simulator\n",
    "\n",
    "n_qubits = 3                                 # 设定量子比特数为3\n",
    "sim = Simulator('mqvector', n_qubits)        # 使用mqvector模拟器，命名为sim\n",
    "\n",
    "circuit = Circuit()                          # 初始化量子线路，命名为circuit\n",
    "circuit += UN(H, n_qubits)                   # 每位量子比特上执行H门操作\n",
    "\n",
    "sim.apply_circuit(circuit)                   # 通过模拟器sim运行搭建好的量子线路circuit\n",
    "\n",
    "circuit.svg()                                # 打印此时的量子线路circuit"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "√2/4¦000⟩\n",
      "√2/4¦001⟩\n",
      "√2/4¦010⟩\n",
      "√2/4¦011⟩\n",
      "√2/4¦100⟩\n",
      "√2/4¦101⟩\n",
      "√2/4¦110⟩\n",
      "√2/4¦111⟩\n"
     ]
    }
   ],
   "source": [
    "print(sim.get_qs(True))                      # 打印模拟器sim中运行量子线路circuit后的末态"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "从运行的结果看到此时的量子线路，以及我们成功生成了3量子比特的均匀叠加态。\n",
    "\n",
    "假设我们需要翻转$|4\\rangle$态的相位，只需调用我们定义好的`bitphaseflip_operator()`函数即可，运行如下代码："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "image/svg+xml": "<div class=\"nb-html-output output_area\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"396.8\" height=\"200\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n<rect x=\"0\" y=\"0\" width=\"396.8\" height=\"200\" fill=\"#ffffff\" />\n<text x=\"20.0\" y=\"40.0\" font-size=\"16px\" dominant-baseline=\"middle\" text-anchor=\"start\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#252b3a\" >\nq0:\n </text>\n<text x=\"20.0\" y=\"100.0\" font-size=\"16px\" dominant-baseline=\"middle\" text-anchor=\"start\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#252b3a\" >\nq1:\n </text>\n<text x=\"20.0\" y=\"160.0\" font-size=\"16px\" dominant-baseline=\"middle\" text-anchor=\"start\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#252b3a\" >\nq2:\n </text>\n<line x1=\"48.8\" x2=\"376.8\" y1=\"40.0\" y2=\"40.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<line x1=\"48.8\" x2=\"376.8\" y1=\"100.0\" y2=\"100.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<line x1=\"48.8\" x2=\"376.8\" y1=\"160.0\" y2=\"160.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n\n<rect x=\"72.8\" y=\"20.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"92.8\" y=\"40.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"72.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"92.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"72.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"92.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"132.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"152.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"212.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"212.8\" x2=\"212.8\" y1=\"40.0\" y2=\"160.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"192.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"212.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"272.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"272.8\" x2=\"272.8\" y1=\"100.0\" y2=\"160.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"252.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"272.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"332.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"332.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"332.8\" x2=\"332.8\" y1=\"40.0\" y2=\"160.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"312.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"332.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n</svg></div>",
      "text/plain": [
       "<mindquantum.io.display.circuit_svg_drawer.SVGCircuit at 0x7f2ee6af3a60>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# pylint: disable=W0104\n",
    "sim.reset()                                                      # 重置模拟器sim维护好的量子态，使得初始化的量子态为|000>\n",
    "\n",
    "phase_inversion_qubit = [4]                                      # 翻转|4>态的相位\n",
    "operator = bitphaseflip_operator(phase_inversion_qubit, n_qubits)# 调用我们定义好的bitphaseflip_operator()函数\n",
    "\n",
    "circuit += operator                                              # 在量子线路circuit中添加翻转|4>态的相位所需的量子门\n",
    "\n",
    "sim.apply_circuit(circuit)                                       # 通过模拟器sim再次运行搭建好的量子线路circuit\n",
    "\n",
    "circuit.svg()                                                    # 打印此时的量子线路circuit"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "√2/4¦000⟩\n",
      "√2/4¦001⟩\n",
      "√2/4¦010⟩\n",
      "√2/4¦011⟩\n",
      "-√2/4¦100⟩\n",
      "√2/4¦101⟩\n",
      "√2/4¦110⟩\n",
      "√2/4¦111⟩\n"
     ]
    }
   ],
   "source": [
    "print(sim.get_qs(True))                                          # 打印模拟器sim中运行量子线路circuit后的末态"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "从运行的结果看到此时的量子线路，以及$|100\\rangle$​​的相位翻转为-1，运行如下代码："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "4\n"
     ]
    }
   ],
   "source": [
    "print(int('100', 2))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "从运行的结果看到，发生相位翻转的$|100\\rangle$态即为我们希望相位翻转的$|4\\rangle$态。\n",
    "\n",
    "假设我们需要翻转除$|0\\rangle$态以外的每个态的相位，运行如下代码："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "image/svg+xml": "<div class=\"nb-html-output output_area\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"456.8\" height=\"200\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n<rect x=\"0\" y=\"0\" width=\"456.8\" height=\"200\" fill=\"#ffffff\" />\n<text x=\"20.0\" y=\"40.0\" font-size=\"16px\" dominant-baseline=\"middle\" text-anchor=\"start\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#252b3a\" >\nq0:\n </text>\n<text x=\"20.0\" y=\"100.0\" font-size=\"16px\" dominant-baseline=\"middle\" text-anchor=\"start\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#252b3a\" >\nq1:\n </text>\n<text x=\"20.0\" y=\"160.0\" font-size=\"16px\" dominant-baseline=\"middle\" text-anchor=\"start\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#252b3a\" >\nq2:\n </text>\n<line x1=\"48.8\" x2=\"436.8\" y1=\"40.0\" y2=\"40.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<line x1=\"48.8\" x2=\"436.8\" y1=\"100.0\" y2=\"100.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<line x1=\"48.8\" x2=\"436.8\" y1=\"160.0\" y2=\"160.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n\n<rect x=\"72.8\" y=\"20.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"92.8\" y=\"40.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"72.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"92.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"72.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"92.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"132.8\" y=\"20.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"152.8\" y=\"40.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n\n<rect x=\"132.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"152.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"212.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"212.8\" x2=\"212.8\" y1=\"40.0\" y2=\"100.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"192.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"212.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n\n<rect x=\"132.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"152.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"272.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"272.8\" x2=\"272.8\" y1=\"40.0\" y2=\"160.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"252.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"272.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"332.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"332.8\" x2=\"332.8\" y1=\"100.0\" y2=\"160.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"312.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"332.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"392.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"392.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"392.8\" x2=\"392.8\" y1=\"40.0\" y2=\"160.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"372.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"392.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n</svg></div>",
      "text/plain": [
       "<mindquantum.io.display.circuit_svg_drawer.SVGCircuit at 0x7f2ee6af3ee0>"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# pylint: disable=W0104\n",
    "n_qubits = 3                                                     # 设定量子比特数为3\n",
    "sim1 = Simulator('mqvector', n_qubits)                           # 使用mqvector模拟器，命名为sim1\n",
    "\n",
    "operator1 = bitphaseflip_operator([i for i in range(1, pow(2, n_qubits))], n_qubits) # 调用我们定义好的bitphaseflip_operator()函数，翻转除|0>态以外的每个态的相位，命名为operator1\n",
    "\n",
    "circuit1 = Circuit()                                             # 初始化量子线路，命名为circuit1\n",
    "circuit1 += UN(H, n_qubits)                                      # 每位量子比特上执行H门操作\n",
    "circuit1 += operator1                                            # 在量子线路circuit1中添加翻转除|0>态以外的每个态的相位所需的量子门\n",
    "\n",
    "sim1.apply_circuit(circuit1)                                     # 通过模拟器sim1运行搭建好的量子线路circuit1\n",
    "\n",
    "circuit1.svg()                                                         # 打印此时的量子线路circuit1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "√2/4¦000⟩\n",
      "-√2/4¦001⟩\n",
      "-√2/4¦010⟩\n",
      "-√2/4¦011⟩\n",
      "-√2/4¦100⟩\n",
      "-√2/4¦101⟩\n",
      "-√2/4¦110⟩\n",
      "-√2/4¦111⟩\n"
     ]
    }
   ],
   "source": [
    "print(sim1.get_qs(True))                                         # 打印模拟器sim1中运行量子线路circuit1后的末态"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "从运行的结果看到此时的量子线路，以及我们成功翻转除$|0\\rangle$态以外的每个态的相位。\n",
    "\n",
    "也就是说，我们定义的函数`bitphaseflip_operator()`可以实现Grover搜素算法中的Oracle算子$U_{\\omega}$和条件相移算子$P$。\n",
    "\n",
    "## 利用MindQuantum实现Grover搜素算法实例\n",
    "\n",
    "### 实例1：$n=3$​，$|\\omega\\rangle=|2\\rangle$（单目标）\n",
    "\n",
    "首先，我们需要定义$G$算子，运行如下代码："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "def G(phase_inversion_qubit, n_qubits):           # 定义Grover搜索算法中的G算子\n",
    "    operator = bitphaseflip_operator(phase_inversion_qubit, n_qubits)\n",
    "    operator += UN(H, n_qubits)\n",
    "    operator += bitphaseflip_operator([i for i in range(1, pow(2, n_qubits))], n_qubits)\n",
    "    operator += UN(H, n_qubits)\n",
    "    return operator"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "然后，我们根据Grover搜索算法的量子线路模型在MindQuantum中搭建对应的量子线路："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "image/svg+xml": "<div class=\"nb-html-output output_area\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1476.8\" height=\"200\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n<rect x=\"0\" y=\"0\" width=\"1476.8\" height=\"200\" fill=\"#ffffff\" />\n<text x=\"20.0\" y=\"40.0\" font-size=\"16px\" dominant-baseline=\"middle\" text-anchor=\"start\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#252b3a\" >\nq0:\n </text>\n<text x=\"20.0\" y=\"100.0\" font-size=\"16px\" dominant-baseline=\"middle\" text-anchor=\"start\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#252b3a\" >\nq1:\n </text>\n<text x=\"20.0\" y=\"160.0\" font-size=\"16px\" dominant-baseline=\"middle\" text-anchor=\"start\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#252b3a\" >\nq2:\n </text>\n<line x1=\"48.8\" x2=\"1456.8\" y1=\"40.0\" y2=\"40.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<line x1=\"48.8\" x2=\"1456.8\" y1=\"100.0\" y2=\"100.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<line x1=\"48.8\" x2=\"1456.8\" y1=\"160.0\" y2=\"160.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n\n<rect x=\"72.8\" y=\"20.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"92.8\" y=\"40.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"72.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"92.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"72.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"92.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"132.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"152.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"212.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"212.8\" x2=\"212.8\" y1=\"40.0\" y2=\"100.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"192.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"212.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"272.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"272.8\" x2=\"272.8\" y1=\"100.0\" y2=\"160.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"252.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"272.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"332.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"332.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"332.8\" x2=\"332.8\" y1=\"40.0\" y2=\"160.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"312.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"332.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n\n<rect x=\"372.8\" y=\"20.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"392.8\" y=\"40.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"372.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"392.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"372.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"392.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"432.8\" y=\"20.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"452.8\" y=\"40.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n\n<rect x=\"432.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"452.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"512.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"512.8\" x2=\"512.8\" y1=\"40.0\" y2=\"100.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"492.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"512.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n\n<rect x=\"432.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"452.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"572.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"572.8\" x2=\"572.8\" y1=\"40.0\" y2=\"160.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"552.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"572.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"632.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"632.8\" x2=\"632.8\" y1=\"100.0\" y2=\"160.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"612.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"632.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"692.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"692.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"692.8\" x2=\"692.8\" y1=\"40.0\" y2=\"160.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"672.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"692.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n\n<rect x=\"732.8\" y=\"20.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"752.8\" y=\"40.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"732.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"752.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"732.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"752.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"792.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"812.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"872.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"872.8\" x2=\"872.8\" y1=\"40.0\" y2=\"100.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"852.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"872.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"932.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"932.8\" x2=\"932.8\" y1=\"100.0\" y2=\"160.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"912.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"932.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"992.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"992.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"992.8\" x2=\"992.8\" y1=\"40.0\" y2=\"160.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"972.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"992.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n\n<rect x=\"1032.8\" y=\"20.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"1052.8\" y=\"40.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"1032.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"1052.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"1032.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"1052.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"1092.8\" y=\"20.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"1112.8\" y=\"40.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n\n<rect x=\"1092.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"1112.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"1172.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"1172.8\" x2=\"1172.8\" y1=\"40.0\" y2=\"100.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"1152.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"1172.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n\n<rect x=\"1092.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"1112.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"1232.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"1232.8\" x2=\"1232.8\" y1=\"40.0\" y2=\"160.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"1212.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"1232.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"1292.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"1292.8\" x2=\"1292.8\" y1=\"100.0\" y2=\"160.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"1272.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"1292.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"1352.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"1352.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"1352.8\" x2=\"1352.8\" y1=\"40.0\" y2=\"160.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"1332.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"1352.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n\n<rect x=\"1392.8\" y=\"20.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"1412.8\" y=\"40.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"1392.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"1412.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"1392.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"1412.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n</svg></div>",
      "text/plain": [
       "<mindquantum.io.display.circuit_svg_drawer.SVGCircuit at 0x7f2e60897c10>"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# pylint: disable=W0104\n",
    "from numpy import pi, sqrt\n",
    "\n",
    "n_qubits = 3                                      # 设定量子比特数为3\n",
    "phase_inversion_qubit = [2]                       # 设定需要翻转相位的目标态，在这里翻转|2>态的相位\n",
    "\n",
    "N = 2 ** (n_qubits)                               # 计算出数据库中元素的总个数\n",
    "M = len(phase_inversion_qubit)                    # 计算出目标态的总个数\n",
    "\n",
    "r = int(pi / 4 * sqrt(N / M))                     # 设定G算子迭代次数为r\n",
    "\n",
    "sim2 = Simulator('mqvector', n_qubits)            # 使用mqvector模拟器，命名为sim2\n",
    "\n",
    "circuit2 = Circuit()                              # 初始化量子线路，命名为circuit2\n",
    "circuit2 += UN(H, n_qubits)                       # 每位量子比特上执行H门操作\n",
    "\n",
    "for i in range(r):                                # 循环执行G算子r次\n",
    "    circuit2 += G(phase_inversion_qubit, n_qubits)\n",
    "\n",
    "sim2.apply_circuit(circuit2)                      # 通过模拟器sim2运行搭建好的量子线路circuit2\n",
    "\n",
    "circuit2.svg()                                    # 打印此时的量子线路circuit2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-√2/16¦000⟩\n",
      "-√2/16¦001⟩\n",
      "0.9722718241315036¦010⟩\n",
      "-√2/16¦011⟩\n",
      "-√2/16¦100⟩\n",
      "-√2/16¦101⟩\n",
      "-√2/16¦110⟩\n",
      "-√2/16¦111⟩\n"
     ]
    }
   ],
   "source": [
    "print(sim2.get_qs(True))                          # 打印模拟器sim2中运行量子线路circuit2后的末态"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "从运行的结果看到，$|010\\rangle$态的振幅为0.9722718241315036，相比于其它的量子态，这是极大的振幅，也就是说，若我们测量此时的状态，将会以极大的概率得到目标态$|010\\rangle$​，运行如下代码进行测量："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "image/svg+xml": "<div class=\"nb-html-output output_area\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"415.6\" height=\"327.0\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n<rect x=\"0\" y=\"0\" width=\"415.6\" height=\"327.0\" fill=\"#ffffff\" />\n<text x=\"10\" y=\"17.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" >\nShots:\n 1000\n </text>\n<text x=\"10\" y=\"31.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" >\nKeys: q2 q1 q0\n </text>\n<line x1=\"45.599999999999994\" x2=\"405.6\" y1=\"62.0\" y2=\"62.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<line x1=\"45.599999999999994\" x2=\"45.599999999999994\" y1=\"55.0\" y2=\"62.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<text x=\"47.599999999999994\" y=\"60.0\" font-size=\"12px\" dominant-baseline=\"bottom\" text-anchor=\"start\" fill=\"#575d6c\" >\n0.0\n </text>\n<line x1=\"45.599999999999994\" x2=\"45.599999999999994\" y1=\"62.0\" y2=\"317.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<line x1=\"105.6\" x2=\"105.6\" y1=\"55.0\" y2=\"62.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<text x=\"107.6\" y=\"60.0\" font-size=\"12px\" dominant-baseline=\"bottom\" text-anchor=\"start\" fill=\"#575d6c\" >\n0.189\n </text>\n<line x1=\"105.6\" x2=\"105.6\" y1=\"62.0\" y2=\"317.0\" stroke=\"#dfe1e6\" stroke-width=\"1\" />\n<line x1=\"165.6\" x2=\"165.6\" y1=\"55.0\" y2=\"62.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<text x=\"167.6\" y=\"60.0\" font-size=\"12px\" dominant-baseline=\"bottom\" text-anchor=\"start\" fill=\"#575d6c\" >\n0.377\n </text>\n<line x1=\"165.6\" x2=\"165.6\" y1=\"62.0\" y2=\"317.0\" stroke=\"#dfe1e6\" stroke-width=\"1\" />\n<line x1=\"225.6\" x2=\"225.6\" y1=\"55.0\" y2=\"62.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<text x=\"227.6\" y=\"60.0\" font-size=\"12px\" dominant-baseline=\"bottom\" text-anchor=\"start\" fill=\"#575d6c\" >\n0.566\n </text>\n<line x1=\"225.6\" x2=\"225.6\" y1=\"62.0\" y2=\"317.0\" stroke=\"#dfe1e6\" stroke-width=\"1\" />\n<line x1=\"285.6\" x2=\"285.6\" y1=\"55.0\" y2=\"62.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<text x=\"287.6\" y=\"60.0\" font-size=\"12px\" dominant-baseline=\"bottom\" text-anchor=\"start\" fill=\"#575d6c\" >\n0.754\n </text>\n<line x1=\"285.6\" x2=\"285.6\" y1=\"62.0\" y2=\"317.0\" stroke=\"#dfe1e6\" stroke-width=\"1\" />\n<line x1=\"345.6\" x2=\"345.6\" y1=\"55.0\" y2=\"62.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<text x=\"347.6\" y=\"60.0\" font-size=\"12px\" dominant-baseline=\"bottom\" text-anchor=\"start\" fill=\"#575d6c\" >\n0.943\n </text>\n<line x1=\"345.6\" x2=\"345.6\" y1=\"62.0\" y2=\"317.0\" stroke=\"#dfe1e6\" stroke-width=\"1\" />\n<text x=\"36.599999999999994\" y=\"85.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >\n000\n </text>\n<line x1=\"38.599999999999994\" x2=\"45.599999999999994\" y1=\"85.0\" y2=\"85.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<rect x=\"45.599999999999994\" y=\"73.0\" width=\"3.181336161187699\" height=\"24\" id=\"bar_0_1666947948304254670\" fill=\"#5e7ce0\" />\n<text x=\"58.781336161187696\" y=\"85.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_0_1666947948304271066\" fill-opacity=\"0\" >\n10\n </text>\n<text x=\"36.599999999999994\" y=\"115.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >\n001\n </text>\n<line x1=\"38.599999999999994\" x2=\"45.599999999999994\" y1=\"115.0\" y2=\"115.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<rect x=\"45.599999999999994\" y=\"103.0\" width=\"2.8632025450689293\" height=\"24\" id=\"bar_1_1666947948304287712\" fill=\"#16acff\" />\n<text x=\"58.463202545068924\" y=\"115.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_1_1666947948304296772\" fill-opacity=\"0\" >\n9\n </text>\n<text x=\"36.599999999999994\" y=\"145.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >\n010\n </text>\n<line x1=\"38.599999999999994\" x2=\"45.599999999999994\" y1=\"145.0\" y2=\"145.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<rect x=\"45.599999999999994\" y=\"133.0\" width=\"300.0\" height=\"24\" id=\"bar_2_1666947948304310918\" fill=\"#5e7ce0\" />\n<text x=\"355.6\" y=\"145.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_2_1666947948304323333\" fill-opacity=\"0\" >\n943\n </text>\n<text x=\"36.599999999999994\" y=\"175.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >\n011\n </text>\n<line x1=\"38.599999999999994\" x2=\"45.599999999999994\" y1=\"175.0\" y2=\"175.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<rect x=\"45.599999999999994\" y=\"163.0\" width=\"1.2725344644750796\" height=\"24\" id=\"bar_3_1666947948304336861\" fill=\"#16acff\" />\n<text x=\"56.87253446447507\" y=\"175.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_3_1666947948304346517\" fill-opacity=\"0\" >\n4\n </text>\n<text x=\"36.599999999999994\" y=\"205.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >\n100\n </text>\n<line x1=\"38.599999999999994\" x2=\"45.599999999999994\" y1=\"205.0\" y2=\"205.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<rect x=\"45.599999999999994\" y=\"193.0\" width=\"2.2269353128313893\" height=\"24\" id=\"bar_4_1666947948304358560\" fill=\"#5e7ce0\" />\n<text x=\"57.82693531283138\" y=\"205.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_4_1666947948304367718\" fill-opacity=\"0\" >\n7\n </text>\n<text x=\"36.599999999999994\" y=\"235.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >\n101\n </text>\n<line x1=\"38.599999999999994\" x2=\"45.599999999999994\" y1=\"235.0\" y2=\"235.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<rect x=\"45.599999999999994\" y=\"223.0\" width=\"3.499469777306469\" height=\"24\" id=\"bar_5_1666947948304379458\" fill=\"#16acff\" />\n<text x=\"59.09946977730647\" y=\"235.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_5_1666947948304388501\" fill-opacity=\"0\" >\n11\n </text>\n<text x=\"36.599999999999994\" y=\"265.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >\n110\n </text>\n<line x1=\"38.599999999999994\" x2=\"45.599999999999994\" y1=\"265.0\" y2=\"265.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<rect x=\"45.599999999999994\" y=\"253.0\" width=\"1.9088016967126196\" height=\"24\" id=\"bar_6_1666947948304400198\" fill=\"#5e7ce0\" />\n<text x=\"57.50880169671261\" y=\"265.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_6_1666947948304407891\" fill-opacity=\"0\" >\n6\n </text>\n<text x=\"36.599999999999994\" y=\"295.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >\n111\n </text>\n<line x1=\"38.599999999999994\" x2=\"45.599999999999994\" y1=\"295.0\" y2=\"295.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<rect x=\"45.599999999999994\" y=\"283.0\" width=\"3.181336161187699\" height=\"24\" id=\"bar_7_1666947948304422337\" fill=\"#16acff\" />\n<text x=\"58.781336161187696\" y=\"295.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_7_1666947948304431255\" fill-opacity=\"0\" >\n10\n </text>\n<animate xlink:href=\"#bar_0_1666947948304254670\" attributeName=\"width\" from=\"0\" to=\"3.181336161187699\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 3.181336161187699\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" />\n<animate xlink:href=\"#bar_1_1666947948304287712\" attributeName=\"width\" from=\"0\" to=\"2.8632025450689293\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 2.8632025450689293\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" />\n<animate xlink:href=\"#bar_2_1666947948304310918\" attributeName=\"width\" from=\"0\" to=\"300.0\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 300.0\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" />\n<animate xlink:href=\"#bar_3_1666947948304336861\" attributeName=\"width\" from=\"0\" to=\"1.2725344644750796\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 1.2725344644750796\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" />\n<animate xlink:href=\"#bar_4_1666947948304358560\" attributeName=\"width\" from=\"0\" to=\"2.2269353128313893\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 2.2269353128313893\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" />\n<animate xlink:href=\"#bar_5_1666947948304379458\" attributeName=\"width\" from=\"0\" to=\"3.499469777306469\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 3.499469777306469\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" />\n<animate xlink:href=\"#bar_6_1666947948304400198\" attributeName=\"width\" from=\"0\" to=\"1.9088016967126196\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 1.9088016967126196\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" />\n<animate xlink:href=\"#bar_7_1666947948304422337\" attributeName=\"width\" from=\"0\" to=\"3.181336161187699\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 3.181336161187699\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" />\n<animate xlink:href=\"#bar_2_1666947948304310918\" attributeName=\"fill\" from=\"#5e7ce0\" to=\"#fac209\" dur=\"0.15s\" calcMode=\"spline\" values=\"#5e7ce0; #fac209\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" />\n<animate xlink:href=\"#bar_text_0_1666947948304271066\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" />\n<animate xlink:href=\"#bar_text_1_1666947948304296772\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" />\n<animate xlink:href=\"#bar_text_2_1666947948304323333\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" />\n<animate xlink:href=\"#bar_text_3_1666947948304346517\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" />\n<animate xlink:href=\"#bar_text_4_1666947948304367718\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" />\n<animate xlink:href=\"#bar_text_5_1666947948304388501\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" />\n<animate xlink:href=\"#bar_text_6_1666947948304407891\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" />\n<animate xlink:href=\"#bar_text_7_1666947948304431255\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" />\n<text x=\"210.3\" y=\"41.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"middle\" >\nprobability\n </text>\n</svg></div>",
      "text/plain": [
       "<mindquantum.io.display.measure_res_svg_drawer.SVGMeasure at 0x7f2e608b9130>"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# pylint: disable=W0104\n",
    "from mindquantum.core.gates import Measure\n",
    "\n",
    "sim2.reset()                                      # 重置模拟器sim2维护好的量子态，使得初始化的量子态为|000>\n",
    "\n",
    "circuit2 += UN(Measure(), circuit2.n_qubits)      # 对量子线路circuit2中的每一位量子比特添加测量门\n",
    "\n",
    "result = sim2.sampling(circuit2, shots=1000)      # 通过模拟器sim2对量子线路circuit2进行1000次的采样\n",
    "result.svg()                                      # 打印采样结果"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "从运行的结果看到，1000次采样中有947次的采样结果为`010`，将其转化为10进制数，运行如下代码："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2\n"
     ]
    }
   ],
   "source": [
    "print(int('010', 2))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "从运行的结果看到，我们成功地搜索出$|2\\rangle$态。\n",
    "\n",
    "### 实例2：$n=5$，$|\\omega\\rangle=|5\\rangle$和$|11\\rangle$（多目标）\n",
    "\n",
    "实例1中实现的是单目标搜索，现在我们尝试实现多目标搜索。首先，$G$算子已经定义好了，我们只需设定量子比特数和需要翻转相位的目标态，然后搭建对应的量子线路即可，运行如下代码："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "image/svg+xml": "<div class=\"nb-html-output output_area\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"6816.8\" height=\"320\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n<rect x=\"0\" y=\"0\" width=\"6816.8\" height=\"320\" fill=\"#ffffff\" />\n<text x=\"20.0\" y=\"40.0\" font-size=\"16px\" dominant-baseline=\"middle\" text-anchor=\"start\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#252b3a\" >\nq0:\n </text>\n<text x=\"20.0\" y=\"100.0\" font-size=\"16px\" dominant-baseline=\"middle\" text-anchor=\"start\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#252b3a\" >\nq1:\n </text>\n<text x=\"20.0\" y=\"160.0\" font-size=\"16px\" dominant-baseline=\"middle\" text-anchor=\"start\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#252b3a\" >\nq2:\n </text>\n<text x=\"20.0\" y=\"220.0\" font-size=\"16px\" dominant-baseline=\"middle\" text-anchor=\"start\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#252b3a\" >\nq3:\n </text>\n<text x=\"20.0\" y=\"280.0\" font-size=\"16px\" dominant-baseline=\"middle\" text-anchor=\"start\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#252b3a\" >\nq4:\n </text>\n<line x1=\"48.8\" x2=\"6796.8\" y1=\"40.0\" y2=\"40.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<line x1=\"48.8\" x2=\"6796.8\" y1=\"100.0\" y2=\"100.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<line x1=\"48.8\" x2=\"6796.8\" y1=\"160.0\" y2=\"160.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<line x1=\"48.8\" x2=\"6796.8\" y1=\"220.0\" y2=\"220.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<line x1=\"48.8\" x2=\"6796.8\" y1=\"280.0\" y2=\"280.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n\n<rect x=\"72.8\" y=\"20.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"92.8\" y=\"40.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"72.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"92.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"72.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"92.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"72.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"92.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"72.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"92.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n<circle cx=\"152.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"152.8\" x2=\"152.8\" y1=\"40.0\" y2=\"160.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"132.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"152.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"212.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"212.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"212.8\" x2=\"212.8\" y1=\"40.0\" y2=\"160.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"192.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"212.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"272.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"272.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"272.8\" x2=\"272.8\" y1=\"40.0\" y2=\"220.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"252.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"272.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"332.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"332.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"332.8\" x2=\"332.8\" y1=\"40.0\" y2=\"220.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"312.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"332.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"392.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"392.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"392.8\" x2=\"392.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"372.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"392.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"452.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"452.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"452.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"452.8\" x2=\"452.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"432.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"452.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"512.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"512.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"512.8\" cy=\"220.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"512.8\" x2=\"512.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"492.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"512.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"572.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"572.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"572.8\" cy=\"220.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"572.8\" x2=\"572.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"552.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"572.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n\n<rect x=\"612.8\" y=\"20.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"632.8\" y=\"40.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"612.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"632.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"612.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"632.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"612.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"632.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"612.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"632.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"672.8\" y=\"20.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"692.8\" y=\"40.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n\n<rect x=\"672.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"692.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"752.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"752.8\" x2=\"752.8\" y1=\"40.0\" y2=\"100.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"732.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"752.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n\n<rect x=\"672.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"692.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"812.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"812.8\" x2=\"812.8\" y1=\"40.0\" y2=\"160.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"792.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"812.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"872.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"872.8\" x2=\"872.8\" y1=\"100.0\" y2=\"160.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"852.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"872.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"932.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"932.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"932.8\" x2=\"932.8\" y1=\"40.0\" y2=\"160.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"912.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"932.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n\n<rect x=\"672.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"692.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"992.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"992.8\" x2=\"992.8\" y1=\"40.0\" y2=\"220.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"972.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"992.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"1052.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"1052.8\" x2=\"1052.8\" y1=\"100.0\" y2=\"220.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"1032.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"1052.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"1112.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"1112.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"1112.8\" x2=\"1112.8\" y1=\"40.0\" y2=\"220.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"1092.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"1112.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"1172.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"1172.8\" x2=\"1172.8\" y1=\"160.0\" y2=\"220.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"1152.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"1172.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"1232.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"1232.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"1232.8\" x2=\"1232.8\" y1=\"40.0\" y2=\"220.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"1212.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"1232.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"1292.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"1292.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"1292.8\" x2=\"1292.8\" y1=\"100.0\" y2=\"220.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"1272.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"1292.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"1352.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"1352.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"1352.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"1352.8\" x2=\"1352.8\" y1=\"40.0\" y2=\"220.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"1332.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"1352.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n\n<rect x=\"672.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"692.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"1412.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"1412.8\" x2=\"1412.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"1392.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"1412.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"1472.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"1472.8\" x2=\"1472.8\" y1=\"100.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"1452.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"1472.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"1532.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"1532.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"1532.8\" x2=\"1532.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"1512.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"1532.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"1592.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"1592.8\" x2=\"1592.8\" y1=\"160.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"1572.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"1592.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"1652.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"1652.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"1652.8\" x2=\"1652.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"1632.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"1652.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"1712.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"1712.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"1712.8\" x2=\"1712.8\" y1=\"100.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"1692.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"1712.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"1772.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"1772.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"1772.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"1772.8\" x2=\"1772.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"1752.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"1772.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"1832.8\" cy=\"220.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"1832.8\" x2=\"1832.8\" y1=\"220.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"1812.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"1832.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"1892.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"1892.8\" cy=\"220.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"1892.8\" x2=\"1892.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"1872.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"1892.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"1952.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"1952.8\" cy=\"220.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"1952.8\" x2=\"1952.8\" y1=\"100.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"1932.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"1952.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"2012.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"2012.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"2012.8\" cy=\"220.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"2012.8\" x2=\"2012.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"1992.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"2012.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"2072.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"2072.8\" cy=\"220.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"2072.8\" x2=\"2072.8\" y1=\"160.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"2052.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"2072.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"2132.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"2132.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"2132.8\" cy=\"220.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"2132.8\" x2=\"2132.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"2112.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"2132.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"2192.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"2192.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"2192.8\" cy=\"220.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"2192.8\" x2=\"2192.8\" y1=\"100.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"2172.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"2192.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"2252.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"2252.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"2252.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"2252.8\" cy=\"220.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"2252.8\" x2=\"2252.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"2232.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"2252.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n\n<rect x=\"2292.8\" y=\"20.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"2312.8\" y=\"40.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"2292.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"2312.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"2292.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"2312.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"2292.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"2312.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"2292.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"2312.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n<circle cx=\"2372.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"2372.8\" x2=\"2372.8\" y1=\"40.0\" y2=\"160.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"2352.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"2372.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"2432.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"2432.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"2432.8\" x2=\"2432.8\" y1=\"40.0\" y2=\"160.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"2412.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"2432.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"2492.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"2492.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"2492.8\" x2=\"2492.8\" y1=\"40.0\" y2=\"220.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"2472.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"2492.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"2552.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"2552.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"2552.8\" x2=\"2552.8\" y1=\"40.0\" y2=\"220.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"2532.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"2552.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"2612.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"2612.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"2612.8\" x2=\"2612.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"2592.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"2612.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"2672.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"2672.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"2672.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"2672.8\" x2=\"2672.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"2652.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"2672.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"2732.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"2732.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"2732.8\" cy=\"220.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"2732.8\" x2=\"2732.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"2712.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"2732.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"2792.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"2792.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"2792.8\" cy=\"220.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"2792.8\" x2=\"2792.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"2772.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"2792.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n\n<rect x=\"2832.8\" y=\"20.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"2852.8\" y=\"40.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"2832.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"2852.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"2832.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"2852.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"2832.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"2852.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"2832.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"2852.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"2892.8\" y=\"20.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"2912.8\" y=\"40.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n\n<rect x=\"2892.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"2912.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"2972.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"2972.8\" x2=\"2972.8\" y1=\"40.0\" y2=\"100.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"2952.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"2972.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n\n<rect x=\"2892.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"2912.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"3032.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"3032.8\" x2=\"3032.8\" y1=\"40.0\" y2=\"160.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"3012.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"3032.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"3092.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"3092.8\" x2=\"3092.8\" y1=\"100.0\" y2=\"160.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"3072.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"3092.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"3152.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"3152.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"3152.8\" x2=\"3152.8\" y1=\"40.0\" y2=\"160.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"3132.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"3152.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n\n<rect x=\"2892.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"2912.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"3212.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"3212.8\" x2=\"3212.8\" y1=\"40.0\" y2=\"220.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"3192.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"3212.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"3272.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"3272.8\" x2=\"3272.8\" y1=\"100.0\" y2=\"220.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"3252.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"3272.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"3332.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"3332.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"3332.8\" x2=\"3332.8\" y1=\"40.0\" y2=\"220.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"3312.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"3332.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"3392.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"3392.8\" x2=\"3392.8\" y1=\"160.0\" y2=\"220.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"3372.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"3392.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"3452.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"3452.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"3452.8\" x2=\"3452.8\" y1=\"40.0\" y2=\"220.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"3432.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"3452.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"3512.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"3512.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"3512.8\" x2=\"3512.8\" y1=\"100.0\" y2=\"220.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"3492.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"3512.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"3572.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"3572.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"3572.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"3572.8\" x2=\"3572.8\" y1=\"40.0\" y2=\"220.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"3552.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"3572.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n\n<rect x=\"2892.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"2912.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"3632.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"3632.8\" x2=\"3632.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"3612.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"3632.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"3692.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"3692.8\" x2=\"3692.8\" y1=\"100.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"3672.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"3692.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"3752.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"3752.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"3752.8\" x2=\"3752.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"3732.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"3752.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"3812.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"3812.8\" x2=\"3812.8\" y1=\"160.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"3792.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"3812.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"3872.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"3872.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"3872.8\" x2=\"3872.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"3852.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"3872.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"3932.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"3932.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"3932.8\" x2=\"3932.8\" y1=\"100.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"3912.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"3932.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"3992.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"3992.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"3992.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"3992.8\" x2=\"3992.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"3972.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"3992.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"4052.8\" cy=\"220.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"4052.8\" x2=\"4052.8\" y1=\"220.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"4032.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"4052.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"4112.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"4112.8\" cy=\"220.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"4112.8\" x2=\"4112.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"4092.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"4112.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"4172.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"4172.8\" cy=\"220.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"4172.8\" x2=\"4172.8\" y1=\"100.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"4152.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"4172.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"4232.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"4232.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"4232.8\" cy=\"220.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"4232.8\" x2=\"4232.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"4212.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"4232.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"4292.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"4292.8\" cy=\"220.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"4292.8\" x2=\"4292.8\" y1=\"160.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"4272.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"4292.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"4352.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"4352.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"4352.8\" cy=\"220.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"4352.8\" x2=\"4352.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"4332.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"4352.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"4412.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"4412.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"4412.8\" cy=\"220.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"4412.8\" x2=\"4412.8\" y1=\"100.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"4392.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"4412.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"4472.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"4472.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"4472.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"4472.8\" cy=\"220.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"4472.8\" x2=\"4472.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"4452.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"4472.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n\n<rect x=\"4512.8\" y=\"20.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"4532.8\" y=\"40.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"4512.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"4532.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"4512.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"4532.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"4512.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"4532.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"4512.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"4532.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n<circle cx=\"4592.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"4592.8\" x2=\"4592.8\" y1=\"40.0\" y2=\"160.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"4572.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"4592.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"4652.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"4652.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"4652.8\" x2=\"4652.8\" y1=\"40.0\" y2=\"160.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"4632.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"4652.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"4712.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"4712.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"4712.8\" x2=\"4712.8\" y1=\"40.0\" y2=\"220.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"4692.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"4712.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"4772.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"4772.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"4772.8\" x2=\"4772.8\" y1=\"40.0\" y2=\"220.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"4752.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"4772.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"4832.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"4832.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"4832.8\" x2=\"4832.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"4812.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"4832.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"4892.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"4892.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"4892.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"4892.8\" x2=\"4892.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"4872.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"4892.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"4952.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"4952.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"4952.8\" cy=\"220.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"4952.8\" x2=\"4952.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"4932.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"4952.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"5012.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"5012.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"5012.8\" cy=\"220.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"5012.8\" x2=\"5012.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"4992.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"5012.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n\n<rect x=\"5052.8\" y=\"20.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"5072.8\" y=\"40.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"5052.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"5072.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"5052.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"5072.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"5052.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"5072.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"5052.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"5072.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"5112.8\" y=\"20.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"5132.8\" y=\"40.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n\n<rect x=\"5112.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"5132.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"5192.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"5192.8\" x2=\"5192.8\" y1=\"40.0\" y2=\"100.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"5172.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"5192.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n\n<rect x=\"5112.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"5132.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"5252.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"5252.8\" x2=\"5252.8\" y1=\"40.0\" y2=\"160.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"5232.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"5252.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"5312.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"5312.8\" x2=\"5312.8\" y1=\"100.0\" y2=\"160.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"5292.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"5312.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"5372.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"5372.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"5372.8\" x2=\"5372.8\" y1=\"40.0\" y2=\"160.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"5352.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"5372.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n\n<rect x=\"5112.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"5132.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"5432.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"5432.8\" x2=\"5432.8\" y1=\"40.0\" y2=\"220.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"5412.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"5432.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"5492.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"5492.8\" x2=\"5492.8\" y1=\"100.0\" y2=\"220.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"5472.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"5492.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"5552.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"5552.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"5552.8\" x2=\"5552.8\" y1=\"40.0\" y2=\"220.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"5532.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"5552.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"5612.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"5612.8\" x2=\"5612.8\" y1=\"160.0\" y2=\"220.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"5592.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"5612.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"5672.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"5672.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"5672.8\" x2=\"5672.8\" y1=\"40.0\" y2=\"220.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"5652.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"5672.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"5732.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"5732.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"5732.8\" x2=\"5732.8\" y1=\"100.0\" y2=\"220.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"5712.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"5732.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"5792.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"5792.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"5792.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"5792.8\" x2=\"5792.8\" y1=\"40.0\" y2=\"220.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"5772.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"5792.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n\n<rect x=\"5112.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"5132.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"5852.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"5852.8\" x2=\"5852.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"5832.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"5852.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"5912.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"5912.8\" x2=\"5912.8\" y1=\"100.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"5892.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"5912.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"5972.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"5972.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"5972.8\" x2=\"5972.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"5952.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"5972.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"6032.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"6032.8\" x2=\"6032.8\" y1=\"160.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"6012.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"6032.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"6092.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"6092.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"6092.8\" x2=\"6092.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"6072.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"6092.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"6152.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"6152.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"6152.8\" x2=\"6152.8\" y1=\"100.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"6132.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"6152.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"6212.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"6212.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"6212.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"6212.8\" x2=\"6212.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"6192.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"6212.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"6272.8\" cy=\"220.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"6272.8\" x2=\"6272.8\" y1=\"220.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"6252.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"6272.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"6332.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"6332.8\" cy=\"220.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"6332.8\" x2=\"6332.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"6312.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"6332.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"6392.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"6392.8\" cy=\"220.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"6392.8\" x2=\"6392.8\" y1=\"100.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"6372.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"6392.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"6452.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"6452.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"6452.8\" cy=\"220.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"6452.8\" x2=\"6452.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"6432.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"6452.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"6512.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"6512.8\" cy=\"220.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"6512.8\" x2=\"6512.8\" y1=\"160.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"6492.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"6512.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"6572.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"6572.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"6572.8\" cy=\"220.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"6572.8\" x2=\"6572.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"6552.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"6572.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"6632.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"6632.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"6632.8\" cy=\"220.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"6632.8\" x2=\"6632.8\" y1=\"100.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"6612.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"6632.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n<circle cx=\"6692.8\" cy=\"40.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"6692.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"6692.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" />\n<circle cx=\"6692.8\" cy=\"220.0\" r=\"4\" fill=\"#5e7ce0\" />\n<line x1=\"6692.8\" x2=\"6692.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" />\n<rect x=\"6672.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"6692.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n\n<rect x=\"6732.8\" y=\"20.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"6752.8\" y=\"40.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"6732.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"6752.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"6732.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"6752.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"6732.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"6752.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"6732.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"6752.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n</svg></div>",
      "text/plain": [
       "<mindquantum.io.display.circuit_svg_drawer.SVGCircuit at 0x7f2e608087f0>"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# pylint: disable=W0104\n",
    "n_qubits = 5                                      # 设定量子比特数为5\n",
    "phase_inversion_qubit = [5, 11]                   # 设定需要翻转相位的目标态，在这里翻转|5>态和|11>态的相位\n",
    "\n",
    "N = 2 ** (n_qubits)                               # 计算出数据库中元素的总个数\n",
    "M = len(phase_inversion_qubit)                    # 计算出目标态的总个数\n",
    "\n",
    "r = int(pi / 4 * sqrt(N / M))                     # 设定G算子迭代次数为r\n",
    "\n",
    "sim3 = Simulator('mqvector', n_qubits)            # 使用mqvector模拟器，命名为sim3\n",
    "\n",
    "circuit3 = Circuit()                              # 初始化量子线路，命名为circuit3\n",
    "circuit3 += UN(H, n_qubits)                       # 每位量子比特上执行H门操作\n",
    "\n",
    "for i in range(r):                                # 循环执行G算子r次\n",
    "    circuit3 += G(phase_inversion_qubit, n_qubits)\n",
    "\n",
    "sim3.apply_circuit(circuit3)                      # 通过模拟器sim3运行搭建好的量子线路circuit3\n",
    "\n",
    "circuit3.svg()                                          # 打印此时的量子线路circuit3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-0.035907766232129455¦00000⟩\n",
      "-0.035907766232129365¦00001⟩\n",
      "-0.03590776623212947¦00010⟩\n",
      "-0.035907766232129254¦00011⟩\n",
      "-0.03590776623212947¦00100⟩\n",
      "0.6932961018664989¦00101⟩\n",
      "-0.035907766232129455¦00110⟩\n",
      "-0.035907766232129365¦00111⟩\n",
      "-0.035907766232129455¦01000⟩\n",
      "-0.035907766232129365¦01001⟩\n",
      "-0.03590776623212947¦01010⟩\n",
      "0.6932961018664989¦01011⟩\n",
      "-0.03590776623212947¦01100⟩\n",
      "-0.035907766232129254¦01101⟩\n",
      "-0.035907766232129455¦01110⟩\n",
      "-0.035907766232129365¦01111⟩\n",
      "-0.0359077662321294¦10000⟩\n",
      "-0.03590776623212939¦10001⟩\n",
      "-0.03590776623212936¦10010⟩\n",
      "-0.03590776623212949¦10011⟩\n",
      "-0.03590776623212936¦10100⟩\n",
      "-0.03590776623212949¦10101⟩\n",
      "-0.0359077662321294¦10110⟩\n",
      "-0.03590776623212939¦10111⟩\n",
      "-0.0359077662321294¦11000⟩\n",
      "-0.03590776623212939¦11001⟩\n",
      "-0.03590776623212936¦11010⟩\n",
      "-0.03590776623212949¦11011⟩\n",
      "-0.03590776623212936¦11100⟩\n",
      "-0.03590776623212949¦11101⟩\n",
      "-0.0359077662321294¦11110⟩\n",
      "-0.03590776623212939¦11111⟩\n"
     ]
    }
   ],
   "source": [
    "print(sim3.get_qs(True))                          # 打印模拟器sim3中运行量子线路circuit3后的末态"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "从运行的结果看到，$|00101\\rangle$​​和$|01011\\rangle$​​态的振幅均为0.6932961018664989，相比于其它的量子态，这是极大的振幅，也就是说，若我们测量此时的状态，将会以极大的概率得到目标态$|00101\\rangle$​​和$|01011\\rangle$​​态，运行如下代码进行测量："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "image/svg+xml": "<div class=\"nb-html-output output_area\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"430.0\" height=\"747.0\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n<rect x=\"0\" y=\"0\" width=\"430.0\" height=\"747.0\" fill=\"#ffffff\" />\n<text x=\"10\" y=\"17.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" >\nShots:\n 1000\n </text>\n<text x=\"10\" y=\"31.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" >\nKeys: q4 q3 q2 q1 q0\n </text>\n<line x1=\"60.0\" x2=\"420.0\" y1=\"62.0\" y2=\"62.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<line x1=\"60.0\" x2=\"60.0\" y1=\"55.0\" y2=\"62.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<text x=\"62.0\" y=\"60.0\" font-size=\"12px\" dominant-baseline=\"bottom\" text-anchor=\"start\" fill=\"#575d6c\" >\n0.0\n </text>\n<line x1=\"60.0\" x2=\"60.0\" y1=\"62.0\" y2=\"737.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<line x1=\"120.0\" x2=\"120.0\" y1=\"55.0\" y2=\"62.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<text x=\"122.0\" y=\"60.0\" font-size=\"12px\" dominant-baseline=\"bottom\" text-anchor=\"start\" fill=\"#575d6c\" >\n0.096\n </text>\n<line x1=\"120.0\" x2=\"120.0\" y1=\"62.0\" y2=\"737.0\" stroke=\"#dfe1e6\" stroke-width=\"1\" />\n<line x1=\"180.0\" x2=\"180.0\" y1=\"55.0\" y2=\"62.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<text x=\"182.0\" y=\"60.0\" font-size=\"12px\" dominant-baseline=\"bottom\" text-anchor=\"start\" fill=\"#575d6c\" >\n0.192\n </text>\n<line x1=\"180.0\" x2=\"180.0\" y1=\"62.0\" y2=\"737.0\" stroke=\"#dfe1e6\" stroke-width=\"1\" />\n<line x1=\"240.0\" x2=\"240.0\" y1=\"55.0\" y2=\"62.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<text x=\"242.0\" y=\"60.0\" font-size=\"12px\" dominant-baseline=\"bottom\" text-anchor=\"start\" fill=\"#575d6c\" >\n0.289\n </text>\n<line x1=\"240.0\" x2=\"240.0\" y1=\"62.0\" y2=\"737.0\" stroke=\"#dfe1e6\" stroke-width=\"1\" />\n<line x1=\"300.0\" x2=\"300.0\" y1=\"55.0\" y2=\"62.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<text x=\"302.0\" y=\"60.0\" font-size=\"12px\" dominant-baseline=\"bottom\" text-anchor=\"start\" fill=\"#575d6c\" >\n0.385\n </text>\n<line x1=\"300.0\" x2=\"300.0\" y1=\"62.0\" y2=\"737.0\" stroke=\"#dfe1e6\" stroke-width=\"1\" />\n<line x1=\"360.0\" x2=\"360.0\" y1=\"55.0\" y2=\"62.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<text x=\"362.0\" y=\"60.0\" font-size=\"12px\" dominant-baseline=\"bottom\" text-anchor=\"start\" fill=\"#575d6c\" >\n0.481\n </text>\n<line x1=\"360.0\" x2=\"360.0\" y1=\"62.0\" y2=\"737.0\" stroke=\"#dfe1e6\" stroke-width=\"1\" />\n<text x=\"51.0\" y=\"85.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >\n00001\n </text>\n<line x1=\"53.0\" x2=\"60.0\" y1=\"85.0\" y2=\"85.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<rect x=\"60.0\" y=\"73.0\" width=\"1.8711018711018712\" height=\"24\" id=\"bar_0_1666947948528455328\" fill=\"#5e7ce0\" />\n<text x=\"71.87110187110187\" y=\"85.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_0_1666947948528472319\" fill-opacity=\"0\" >\n3\n </text>\n<text x=\"51.0\" y=\"115.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >\n00011\n </text>\n<line x1=\"53.0\" x2=\"60.0\" y1=\"115.0\" y2=\"115.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<rect x=\"60.0\" y=\"103.0\" width=\"1.2474012474012475\" height=\"24\" id=\"bar_1_1666947948528487656\" fill=\"#16acff\" />\n<text x=\"71.24740124740126\" y=\"115.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_1_1666947948528497191\" fill-opacity=\"0\" >\n2\n </text>\n<text x=\"51.0\" y=\"145.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >\n00101\n </text>\n<line x1=\"53.0\" x2=\"60.0\" y1=\"145.0\" y2=\"145.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<rect x=\"60.0\" y=\"133.0\" width=\"298.1288981288982\" height=\"24\" id=\"bar_2_1666947948528510845\" fill=\"#5e7ce0\" />\n<text x=\"368.1288981288982\" y=\"145.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_2_1666947948528519355\" fill-opacity=\"0\" >\n478\n </text>\n<text x=\"51.0\" y=\"175.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >\n00110\n </text>\n<line x1=\"53.0\" x2=\"60.0\" y1=\"175.0\" y2=\"175.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<rect x=\"60.0\" y=\"163.0\" width=\"2.494802494802495\" height=\"24\" id=\"bar_3_1666947948528531841\" fill=\"#16acff\" />\n<text x=\"72.4948024948025\" y=\"175.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_3_1666947948528539571\" fill-opacity=\"0\" >\n4\n </text>\n<text x=\"51.0\" y=\"205.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >\n01000\n </text>\n<line x1=\"53.0\" x2=\"60.0\" y1=\"205.0\" y2=\"205.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<rect x=\"60.0\" y=\"193.0\" width=\"2.494802494802495\" height=\"24\" id=\"bar_4_1666947948528551887\" fill=\"#5e7ce0\" />\n<text x=\"72.4948024948025\" y=\"205.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_4_1666947948528559552\" fill-opacity=\"0\" >\n4\n </text>\n<text x=\"51.0\" y=\"235.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >\n01001\n </text>\n<line x1=\"53.0\" x2=\"60.0\" y1=\"235.0\" y2=\"235.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<rect x=\"60.0\" y=\"223.0\" width=\"0.6237006237006237\" height=\"24\" id=\"bar_5_1666947948528571668\" fill=\"#16acff\" />\n<text x=\"70.62370062370061\" y=\"235.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_5_1666947948528579687\" fill-opacity=\"0\" >\n1\n </text>\n<text x=\"51.0\" y=\"265.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >\n01010\n </text>\n<line x1=\"53.0\" x2=\"60.0\" y1=\"265.0\" y2=\"265.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<rect x=\"60.0\" y=\"253.0\" width=\"0.6237006237006237\" height=\"24\" id=\"bar_6_1666947948528592210\" fill=\"#5e7ce0\" />\n<text x=\"70.62370062370061\" y=\"265.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_6_1666947948528599803\" fill-opacity=\"0\" >\n1\n </text>\n<text x=\"51.0\" y=\"295.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >\n01011\n </text>\n<line x1=\"53.0\" x2=\"60.0\" y1=\"295.0\" y2=\"295.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<rect x=\"60.0\" y=\"283.0\" width=\"300.0\" height=\"24\" id=\"bar_7_1666947948528612136\" fill=\"#16acff\" />\n<text x=\"370.0\" y=\"295.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_7_1666947948528623971\" fill-opacity=\"0\" >\n481\n </text>\n<text x=\"51.0\" y=\"325.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >\n01100\n </text>\n<line x1=\"53.0\" x2=\"60.0\" y1=\"325.0\" y2=\"325.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<rect x=\"60.0\" y=\"313.0\" width=\"0.6237006237006237\" height=\"24\" id=\"bar_8_1666947948528636353\" fill=\"#5e7ce0\" />\n<text x=\"70.62370062370061\" y=\"325.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_8_1666947948528644995\" fill-opacity=\"0\" >\n1\n </text>\n<text x=\"51.0\" y=\"355.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >\n01101\n </text>\n<line x1=\"53.0\" x2=\"60.0\" y1=\"355.0\" y2=\"355.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<rect x=\"60.0\" y=\"343.0\" width=\"3.1185031185031185\" height=\"24\" id=\"bar_9_1666947948528658017\" fill=\"#16acff\" />\n<text x=\"73.11850311850313\" y=\"355.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_9_1666947948528665858\" fill-opacity=\"0\" >\n5\n </text>\n<text x=\"51.0\" y=\"385.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >\n01110\n </text>\n<line x1=\"53.0\" x2=\"60.0\" y1=\"385.0\" y2=\"385.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<rect x=\"60.0\" y=\"373.0\" width=\"0.6237006237006237\" height=\"24\" id=\"bar_10_1666947948528678799\" fill=\"#5e7ce0\" />\n<text x=\"70.62370062370061\" y=\"385.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_10_1666947948528686763\" fill-opacity=\"0\" >\n1\n </text>\n<text x=\"51.0\" y=\"415.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >\n01111\n </text>\n<line x1=\"53.0\" x2=\"60.0\" y1=\"415.0\" y2=\"415.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<rect x=\"60.0\" y=\"403.0\" width=\"0.6237006237006237\" height=\"24\" id=\"bar_11_1666947948528698620\" fill=\"#16acff\" />\n<text x=\"70.62370062370061\" y=\"415.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_11_1666947948528706354\" fill-opacity=\"0\" >\n1\n </text>\n<text x=\"51.0\" y=\"445.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >\n10000\n </text>\n<line x1=\"53.0\" x2=\"60.0\" y1=\"445.0\" y2=\"445.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<rect x=\"60.0\" y=\"433.0\" width=\"1.2474012474012475\" height=\"24\" id=\"bar_12_1666947948528717990\" fill=\"#5e7ce0\" />\n<text x=\"71.24740124740126\" y=\"445.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_12_1666947948528730917\" fill-opacity=\"0\" >\n2\n </text>\n<text x=\"51.0\" y=\"475.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >\n10010\n </text>\n<line x1=\"53.0\" x2=\"60.0\" y1=\"475.0\" y2=\"475.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<rect x=\"60.0\" y=\"463.0\" width=\"1.2474012474012475\" height=\"24\" id=\"bar_13_1666947948528744139\" fill=\"#16acff\" />\n<text x=\"71.24740124740126\" y=\"475.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_13_1666947948528752121\" fill-opacity=\"0\" >\n2\n </text>\n<text x=\"51.0\" y=\"505.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >\n10100\n </text>\n<line x1=\"53.0\" x2=\"60.0\" y1=\"505.0\" y2=\"505.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<rect x=\"60.0\" y=\"493.0\" width=\"1.8711018711018712\" height=\"24\" id=\"bar_14_1666947948528764155\" fill=\"#5e7ce0\" />\n<text x=\"71.87110187110187\" y=\"505.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_14_1666947948528773530\" fill-opacity=\"0\" >\n3\n </text>\n<text x=\"51.0\" y=\"535.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >\n10101\n </text>\n<line x1=\"53.0\" x2=\"60.0\" y1=\"535.0\" y2=\"535.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<rect x=\"60.0\" y=\"523.0\" width=\"2.494802494802495\" height=\"24\" id=\"bar_15_1666947948528785320\" fill=\"#16acff\" />\n<text x=\"72.4948024948025\" y=\"535.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_15_1666947948528794146\" fill-opacity=\"0\" >\n4\n </text>\n<text x=\"51.0\" y=\"565.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >\n11000\n </text>\n<line x1=\"53.0\" x2=\"60.0\" y1=\"565.0\" y2=\"565.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<rect x=\"60.0\" y=\"553.0\" width=\"0.6237006237006237\" height=\"24\" id=\"bar_16_1666947948528805637\" fill=\"#5e7ce0\" />\n<text x=\"70.62370062370061\" y=\"565.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_16_1666947948528814613\" fill-opacity=\"0\" >\n1\n </text>\n<text x=\"51.0\" y=\"595.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >\n11001\n </text>\n<line x1=\"53.0\" x2=\"60.0\" y1=\"595.0\" y2=\"595.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<rect x=\"60.0\" y=\"583.0\" width=\"1.2474012474012475\" height=\"24\" id=\"bar_17_1666947948528826861\" fill=\"#16acff\" />\n<text x=\"71.24740124740126\" y=\"595.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_17_1666947948528836141\" fill-opacity=\"0\" >\n2\n </text>\n<text x=\"51.0\" y=\"625.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >\n11011\n </text>\n<line x1=\"53.0\" x2=\"60.0\" y1=\"625.0\" y2=\"625.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<rect x=\"60.0\" y=\"613.0\" width=\"0.6237006237006237\" height=\"24\" id=\"bar_18_1666947948528850560\" fill=\"#5e7ce0\" />\n<text x=\"70.62370062370061\" y=\"625.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_18_1666947948528858330\" fill-opacity=\"0\" >\n1\n </text>\n<text x=\"51.0\" y=\"655.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >\n11100\n </text>\n<line x1=\"53.0\" x2=\"60.0\" y1=\"655.0\" y2=\"655.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<rect x=\"60.0\" y=\"643.0\" width=\"0.6237006237006237\" height=\"24\" id=\"bar_19_1666947948528871531\" fill=\"#16acff\" />\n<text x=\"70.62370062370061\" y=\"655.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_19_1666947948528879202\" fill-opacity=\"0\" >\n1\n </text>\n<text x=\"51.0\" y=\"685.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >\n11101\n </text>\n<line x1=\"53.0\" x2=\"60.0\" y1=\"685.0\" y2=\"685.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<rect x=\"60.0\" y=\"673.0\" width=\"0.6237006237006237\" height=\"24\" id=\"bar_20_1666947948528891066\" fill=\"#5e7ce0\" />\n<text x=\"70.62370062370061\" y=\"685.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_20_1666947948528900117\" fill-opacity=\"0\" >\n1\n </text>\n<text x=\"51.0\" y=\"715.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >\n11111\n </text>\n<line x1=\"53.0\" x2=\"60.0\" y1=\"715.0\" y2=\"715.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<rect x=\"60.0\" y=\"703.0\" width=\"0.6237006237006237\" height=\"24\" id=\"bar_21_1666947948528913514\" fill=\"#16acff\" />\n<text x=\"70.62370062370061\" y=\"715.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_21_1666947948528921202\" fill-opacity=\"0\" >\n1\n </text>\n<animate xlink:href=\"#bar_0_1666947948528455328\" attributeName=\"width\" from=\"0\" to=\"1.8711018711018712\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 1.8711018711018712\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" />\n<animate xlink:href=\"#bar_1_1666947948528487656\" attributeName=\"width\" from=\"0\" to=\"1.2474012474012475\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 1.2474012474012475\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" />\n<animate xlink:href=\"#bar_2_1666947948528510845\" attributeName=\"width\" from=\"0\" to=\"298.1288981288982\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 298.1288981288982\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" />\n<animate xlink:href=\"#bar_3_1666947948528531841\" attributeName=\"width\" from=\"0\" to=\"2.494802494802495\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 2.494802494802495\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" />\n<animate xlink:href=\"#bar_4_1666947948528551887\" attributeName=\"width\" from=\"0\" to=\"2.494802494802495\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 2.494802494802495\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" />\n<animate xlink:href=\"#bar_5_1666947948528571668\" attributeName=\"width\" from=\"0\" to=\"0.6237006237006237\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 0.6237006237006237\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" />\n<animate xlink:href=\"#bar_6_1666947948528592210\" attributeName=\"width\" from=\"0\" to=\"0.6237006237006237\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 0.6237006237006237\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" />\n<animate xlink:href=\"#bar_7_1666947948528612136\" attributeName=\"width\" from=\"0\" to=\"300.0\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 300.0\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" />\n<animate xlink:href=\"#bar_8_1666947948528636353\" attributeName=\"width\" from=\"0\" to=\"0.6237006237006237\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 0.6237006237006237\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" />\n<animate xlink:href=\"#bar_9_1666947948528658017\" attributeName=\"width\" from=\"0\" to=\"3.1185031185031185\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 3.1185031185031185\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" />\n<animate xlink:href=\"#bar_10_1666947948528678799\" attributeName=\"width\" from=\"0\" to=\"0.6237006237006237\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 0.6237006237006237\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" />\n<animate xlink:href=\"#bar_11_1666947948528698620\" attributeName=\"width\" from=\"0\" to=\"0.6237006237006237\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 0.6237006237006237\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" />\n<animate xlink:href=\"#bar_12_1666947948528717990\" attributeName=\"width\" from=\"0\" to=\"1.2474012474012475\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 1.2474012474012475\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" />\n<animate xlink:href=\"#bar_13_1666947948528744139\" attributeName=\"width\" from=\"0\" to=\"1.2474012474012475\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 1.2474012474012475\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" />\n<animate xlink:href=\"#bar_14_1666947948528764155\" attributeName=\"width\" from=\"0\" to=\"1.8711018711018712\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 1.8711018711018712\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" />\n<animate xlink:href=\"#bar_15_1666947948528785320\" attributeName=\"width\" from=\"0\" to=\"2.494802494802495\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 2.494802494802495\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" />\n<animate xlink:href=\"#bar_16_1666947948528805637\" attributeName=\"width\" from=\"0\" to=\"0.6237006237006237\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 0.6237006237006237\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" />\n<animate xlink:href=\"#bar_17_1666947948528826861\" attributeName=\"width\" from=\"0\" to=\"1.2474012474012475\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 1.2474012474012475\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" />\n<animate xlink:href=\"#bar_18_1666947948528850560\" attributeName=\"width\" from=\"0\" to=\"0.6237006237006237\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 0.6237006237006237\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" />\n<animate xlink:href=\"#bar_19_1666947948528871531\" attributeName=\"width\" from=\"0\" to=\"0.6237006237006237\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 0.6237006237006237\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" />\n<animate xlink:href=\"#bar_20_1666947948528891066\" attributeName=\"width\" from=\"0\" to=\"0.6237006237006237\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 0.6237006237006237\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" />\n<animate xlink:href=\"#bar_21_1666947948528913514\" attributeName=\"width\" from=\"0\" to=\"0.6237006237006237\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 0.6237006237006237\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" />\n<animate xlink:href=\"#bar_7_1666947948528612136\" attributeName=\"fill\" from=\"#16acff\" to=\"#fac209\" dur=\"0.15s\" calcMode=\"spline\" values=\"#16acff; #fac209\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" />\n<animate xlink:href=\"#bar_text_0_1666947948528472319\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" />\n<animate xlink:href=\"#bar_text_1_1666947948528497191\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" />\n<animate xlink:href=\"#bar_text_2_1666947948528519355\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" />\n<animate xlink:href=\"#bar_text_3_1666947948528539571\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" />\n<animate xlink:href=\"#bar_text_4_1666947948528559552\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" />\n<animate xlink:href=\"#bar_text_5_1666947948528579687\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" />\n<animate xlink:href=\"#bar_text_6_1666947948528599803\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" />\n<animate xlink:href=\"#bar_text_7_1666947948528623971\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" />\n<animate xlink:href=\"#bar_text_8_1666947948528644995\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" />\n<animate xlink:href=\"#bar_text_9_1666947948528665858\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" />\n<animate xlink:href=\"#bar_text_10_1666947948528686763\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" />\n<animate xlink:href=\"#bar_text_11_1666947948528706354\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" />\n<animate xlink:href=\"#bar_text_12_1666947948528730917\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" />\n<animate xlink:href=\"#bar_text_13_1666947948528752121\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" />\n<animate xlink:href=\"#bar_text_14_1666947948528773530\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" />\n<animate xlink:href=\"#bar_text_15_1666947948528794146\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" />\n<animate xlink:href=\"#bar_text_16_1666947948528814613\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" />\n<animate xlink:href=\"#bar_text_17_1666947948528836141\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" />\n<animate xlink:href=\"#bar_text_18_1666947948528858330\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" />\n<animate xlink:href=\"#bar_text_19_1666947948528879202\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" />\n<animate xlink:href=\"#bar_text_20_1666947948528900117\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" />\n<animate xlink:href=\"#bar_text_21_1666947948528921202\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" />\n<text x=\"217.5\" y=\"41.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"middle\" >\nprobability\n </text>\n</svg></div>",
      "text/plain": [
       "<mindquantum.io.display.measure_res_svg_drawer.SVGMeasure at 0x7f2e6080d640>"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# pylint: disable=W0104\n",
    "sim3.reset()                                      # 重置模拟器sim3维护好的量子态，使得初始化的量子态为|00000>\n",
    "\n",
    "circuit3 += UN(Measure(), circuit3.n_qubits)      # 对量子线路circuit3中的每一位量子比特添加测量门\n",
    "\n",
    "result1 = sim3.sampling(circuit3, shots=1000)     # 通过模拟器sim3对量子线路circuit3进行1000次的采样\n",
    "result1.svg()                                     # 打印采样结果"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "从运行的结果看到，1000次采样中有463次的采样结果为`00101`和503次的采样结果为`01011`，将其转化为10进制数，运行如下代码："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "5\n",
      "11\n"
     ]
    }
   ],
   "source": [
    "print(int('00101', 2))\n",
    "print(int('01011', 2))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "从运行的结果看到，我们成功地搜索出$|5\\rangle$​​和$|11\\rangle$​​​​​态。\n",
    "\n",
    "至此，我们介绍了Grover搜索算法的基本原理，以及通过两个具体的小例子来展示如何利用MindQuantum实现该算法！赶紧动手体验一下量子编程的乐趣吧！\n",
    "\n",
    "## 龙算法\n",
    "\n",
    "除了在规模为4的数据库中找1个数据的场景，Grover算法不能够精确的搜索出所标记态。清华大学龙桂鲁教授在Grover算法基础之上提出量子精确搜索算法龙算法[3]，能够以准确率为1的概率在所有场景中搜索出目标态。其主要思想是将Grover算子改写为如下的算子，\n",
    "\n",
    "$$L = -H^{\\otimes n} R_0 H^{\\otimes n} R_\\tau$$\n",
    "\n",
    "其中：$R_0 = (I+(e^{i\\theta}-1)\\left|0\\right>\\left<0\\right|)$，$R_\\tau = (I+(e^{i\\theta}-1)\\left|\\tau\\right>\\left<\\tau\\right|)$。在满足相位匹配条件时，\n",
    "\n",
    "$$\\theta = 2\\arcsin\\left(\\sin\\beta\\sin\\left(\\frac{\\pi}{4J_s+6}\\right)\\right)$$\n",
    "\n",
    "我们只需作用$J_s+1$次龙算子，就可以以概率1找到目标态，这里$\\beta=\\arcsin{\\sqrt{M/N}}$，$M$为标记态个数，$N$为数据库大小，$J_s>=[((\\pi/2)-\\beta)/\\beta]$。下面我们用MindQuantum来实现。\n",
    "\n",
    "### 一般角度相位转动线路\n",
    "\n",
    "借助于辅助比特，我们搭建某个计算基矢一般角度相位转动线路。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "from mindquantum.core.gates import X, PhaseShift\n",
    "from mindquantum.core.circuit import Circuit\n",
    "def change_phase_with_anclia(which, n_qubits, phase):\n",
    "    c = Circuit()\n",
    "    which_bit = bin(which)[2:].zfill(n_qubits)[::-1]\n",
    "    polarity_circ = Circuit()\n",
    "    for idx, bit in enumerate(which_bit):\n",
    "        if bit == \"0\":\n",
    "            polarity_circ += X.on(idx)\n",
    "    c += polarity_circ\n",
    "    c += PhaseShift(phase).on(n_qubits, list(range(n_qubits)))\n",
    "    c += polarity_circ\n",
    "    return c"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 搭建龙算子"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "from mindquantum.core.gates import BARRIER, Z\n",
    "\n",
    "def L(which, n_qubits, theta, phi):\n",
    "    U = UN(H, n_qubits)\n",
    "    R0 = change_phase_with_anclia(0, n_qubits, theta)\n",
    "    R_t = change_phase_with_anclia(which, n_qubits, phi)\n",
    "    g_ops = R_t + BARRIER + U + BARRIER + R0 + BARRIER + U + BARRIER\n",
    "    g_ops += Z.on(n_qubits)\n",
    "    return g_ops"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 完成量子精确搜索算法：龙算法\n",
    "\n",
    "这里我们以3比特数据库中搜索$\\left|2\\right>$态为例，完成龙算法。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": "<div class=\"nb-html-output output_area\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1336.8\" height=\"260\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n<rect x=\"0\" y=\"0\" width=\"1336.8\" height=\"260\" fill=\"#ffffff\" />\n<text x=\"20.0\" y=\"40.0\" font-size=\"16px\" dominant-baseline=\"middle\" text-anchor=\"start\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#252b3a\" >\nq0:\n </text>\n<text x=\"20.0\" y=\"100.0\" font-size=\"16px\" dominant-baseline=\"middle\" text-anchor=\"start\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#252b3a\" >\nq1:\n </text>\n<text x=\"20.0\" y=\"160.0\" font-size=\"16px\" dominant-baseline=\"middle\" text-anchor=\"start\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#252b3a\" >\nq2:\n </text>\n<text x=\"20.0\" y=\"220.0\" font-size=\"16px\" dominant-baseline=\"middle\" text-anchor=\"start\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#252b3a\" >\nq3:\n </text>\n<line x1=\"48.8\" x2=\"1316.8\" y1=\"40.0\" y2=\"40.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<line x1=\"48.8\" x2=\"1316.8\" y1=\"100.0\" y2=\"100.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<line x1=\"48.8\" x2=\"1316.8\" y1=\"160.0\" y2=\"160.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<line x1=\"48.8\" x2=\"1316.8\" y1=\"220.0\" y2=\"220.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n\n<rect x=\"72.8\" y=\"20.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"92.8\" y=\"40.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"72.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"92.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"72.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"92.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"72.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"92.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nX\n </text>\n\n\n<rect x=\"132.8\" y=\"20.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"152.8\" y=\"40.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nX\n </text>\n\n\n<rect x=\"132.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"152.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nX\n </text>\n\n<circle cx=\"232.8\" cy=\"40.0\" r=\"4\" fill=\"#fac209\" />\n<circle cx=\"232.8\" cy=\"100.0\" r=\"4\" fill=\"#fac209\" />\n<circle cx=\"232.8\" cy=\"160.0\" r=\"4\" fill=\"#fac209\" />\n<line x1=\"232.8\" x2=\"232.8\" y1=\"40.0\" y2=\"220.0\" stroke=\"#fac209\" stroke-width=\"3\" />\n<rect x=\"192.8\" y=\"200.0\" width=\"80.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#fac209\" fill-opacity=\"1\" />\n<text x=\"232.8\" y=\"216.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nPS\n </text>\n<text x=\"232.8\" y=\"232.0\" font-size=\"14.0px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\n2.1269\n </text>\n\n\n<rect x=\"292.8\" y=\"20.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"312.8\" y=\"40.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nX\n </text>\n\n\n<rect x=\"292.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"312.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nX\n </text>\n\n<rect x=\"352.8\" y=\"20.0\" width=\"0\" height=\"220\" fill=\"gray\" fill-opacity=\"0.8\" />\n\n<rect x=\"352.8\" y=\"20.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"372.8\" y=\"40.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"352.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"372.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"352.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"372.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n<rect x=\"412.8\" y=\"20.0\" width=\"0\" height=\"220\" fill=\"gray\" fill-opacity=\"0.8\" />\n\n<rect x=\"412.8\" y=\"20.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"432.8\" y=\"40.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nX\n </text>\n\n\n<rect x=\"412.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"432.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nX\n </text>\n\n\n<rect x=\"412.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"432.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nX\n </text>\n\n<circle cx=\"512.8\" cy=\"40.0\" r=\"4\" fill=\"#fac209\" />\n<circle cx=\"512.8\" cy=\"100.0\" r=\"4\" fill=\"#fac209\" />\n<circle cx=\"512.8\" cy=\"160.0\" r=\"4\" fill=\"#fac209\" />\n<line x1=\"512.8\" x2=\"512.8\" y1=\"40.0\" y2=\"220.0\" stroke=\"#fac209\" stroke-width=\"3\" />\n<rect x=\"472.8\" y=\"200.0\" width=\"80.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#fac209\" fill-opacity=\"1\" />\n<text x=\"512.8\" y=\"216.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nPS\n </text>\n<text x=\"512.8\" y=\"232.0\" font-size=\"14.0px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\n2.1269\n </text>\n\n\n<rect x=\"572.8\" y=\"20.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"592.8\" y=\"40.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nX\n </text>\n\n\n<rect x=\"572.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"592.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nX\n </text>\n\n\n<rect x=\"572.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"592.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nX\n </text>\n\n<rect x=\"632.8\" y=\"20.0\" width=\"0\" height=\"220\" fill=\"gray\" fill-opacity=\"0.8\" />\n\n<rect x=\"632.8\" y=\"20.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"652.8\" y=\"40.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"632.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"652.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"632.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"652.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n<rect x=\"692.8\" y=\"20.0\" width=\"0\" height=\"220\" fill=\"gray\" fill-opacity=\"0.8\" />\n\n<rect x=\"692.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"712.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n\n<rect x=\"692.8\" y=\"20.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"712.8\" y=\"40.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nX\n </text>\n\n\n<rect x=\"692.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"712.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nX\n </text>\n\n<circle cx=\"792.8\" cy=\"40.0\" r=\"4\" fill=\"#fac209\" />\n<circle cx=\"792.8\" cy=\"100.0\" r=\"4\" fill=\"#fac209\" />\n<circle cx=\"792.8\" cy=\"160.0\" r=\"4\" fill=\"#fac209\" />\n<line x1=\"792.8\" x2=\"792.8\" y1=\"40.0\" y2=\"220.0\" stroke=\"#fac209\" stroke-width=\"3\" />\n<rect x=\"752.8\" y=\"200.0\" width=\"80.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#fac209\" fill-opacity=\"1\" />\n<text x=\"792.8\" y=\"216.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nPS\n </text>\n<text x=\"792.8\" y=\"232.0\" font-size=\"14.0px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\n2.1269\n </text>\n\n\n<rect x=\"852.8\" y=\"20.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"872.8\" y=\"40.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nX\n </text>\n\n\n<rect x=\"852.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"872.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nX\n </text>\n\n<rect x=\"912.8\" y=\"20.0\" width=\"0\" height=\"220\" fill=\"gray\" fill-opacity=\"0.8\" />\n\n<rect x=\"912.8\" y=\"20.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"932.8\" y=\"40.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"912.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"932.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"912.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"932.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n<rect x=\"972.8\" y=\"20.0\" width=\"0\" height=\"220\" fill=\"gray\" fill-opacity=\"0.8\" />\n\n<rect x=\"972.8\" y=\"20.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"992.8\" y=\"40.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nX\n </text>\n\n\n<rect x=\"972.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"992.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nX\n </text>\n\n\n<rect x=\"972.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"992.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nX\n </text>\n\n<circle cx=\"1072.8\" cy=\"40.0\" r=\"4\" fill=\"#fac209\" />\n<circle cx=\"1072.8\" cy=\"100.0\" r=\"4\" fill=\"#fac209\" />\n<circle cx=\"1072.8\" cy=\"160.0\" r=\"4\" fill=\"#fac209\" />\n<line x1=\"1072.8\" x2=\"1072.8\" y1=\"40.0\" y2=\"220.0\" stroke=\"#fac209\" stroke-width=\"3\" />\n<rect x=\"1032.8\" y=\"200.0\" width=\"80.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#fac209\" fill-opacity=\"1\" />\n<text x=\"1072.8\" y=\"216.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nPS\n </text>\n<text x=\"1072.8\" y=\"232.0\" font-size=\"14.0px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\n2.1269\n </text>\n\n\n<rect x=\"1132.8\" y=\"20.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"1152.8\" y=\"40.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nX\n </text>\n\n\n<rect x=\"1132.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"1152.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nX\n </text>\n\n\n<rect x=\"1132.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"1152.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nX\n </text>\n\n<rect x=\"1192.8\" y=\"20.0\" width=\"0\" height=\"220\" fill=\"gray\" fill-opacity=\"0.8\" />\n\n<rect x=\"1192.8\" y=\"20.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"1212.8\" y=\"40.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"1192.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"1212.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n\n<rect x=\"1192.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"1212.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nH\n </text>\n\n<rect x=\"1252.8\" y=\"20.0\" width=\"0\" height=\"220\" fill=\"gray\" fill-opacity=\"0.8\" />\n\n<rect x=\"1252.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" />\n<text x=\"1272.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >\nZ\n </text>\n\n</svg></div>",
      "text/plain": [
       "<mindquantum.io.display.circuit_svg_drawer.SVGCircuit at 0x7f2e60755520>"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import numpy as np\n",
    "from mindquantum.core.gates import H\n",
    "from mindquantum.core.circuit import UN\n",
    "n_qubits = 3\n",
    "will_find = 2\n",
    "beta = np.arcsin(np.sqrt(1 / 2**n_qubits))\n",
    "Js = int((np.pi / 2 - beta) / 2 / beta)\n",
    "theta = 2 * np.arcsin(np.sin(np.pi / (4 * Js + 6)) / np.sin(beta))\n",
    "phi = theta\n",
    "\n",
    "g = L(will_find, n_qubits, theta, phi)            # 构建用于精确搜索的龙算子\n",
    "\n",
    "circ = UN(H, n_qubits) + X.on(n_qubits)\n",
    "for i in range(Js + 1):\n",
    "    circ += g\n",
    "circ.svg()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "接下来，我们计算线路的量子态。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(0.048708136684586345-0.9988130542902997j)¦1010⟩\n"
     ]
    }
   ],
   "source": [
    "print(circ.get_qs(ket=True))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "发现，除去相位，我们可以精确的得到目标态。通过采样，我们也可以得到如下类似的结果。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": "<div class=\"nb-html-output output_area\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"422.8\" height=\"117.0\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n<rect x=\"0\" y=\"0\" width=\"422.8\" height=\"117.0\" fill=\"#ffffff\" />\n<text x=\"10\" y=\"17.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" >\nShots:\n 100\n </text>\n<text x=\"10\" y=\"31.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" >\nKeys: q3 q2 q1 q0\n </text>\n<line x1=\"52.8\" x2=\"412.8\" y1=\"62.0\" y2=\"62.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<line x1=\"52.8\" x2=\"52.8\" y1=\"55.0\" y2=\"62.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<text x=\"54.8\" y=\"60.0\" font-size=\"12px\" dominant-baseline=\"bottom\" text-anchor=\"start\" fill=\"#575d6c\" >\n0.0\n </text>\n<line x1=\"52.8\" x2=\"52.8\" y1=\"62.0\" y2=\"107.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<line x1=\"112.8\" x2=\"112.8\" y1=\"55.0\" y2=\"62.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<text x=\"114.8\" y=\"60.0\" font-size=\"12px\" dominant-baseline=\"bottom\" text-anchor=\"start\" fill=\"#575d6c\" >\n0.2\n </text>\n<line x1=\"112.8\" x2=\"112.8\" y1=\"62.0\" y2=\"107.0\" stroke=\"#dfe1e6\" stroke-width=\"1\" />\n<line x1=\"172.8\" x2=\"172.8\" y1=\"55.0\" y2=\"62.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<text x=\"174.8\" y=\"60.0\" font-size=\"12px\" dominant-baseline=\"bottom\" text-anchor=\"start\" fill=\"#575d6c\" >\n0.4\n </text>\n<line x1=\"172.8\" x2=\"172.8\" y1=\"62.0\" y2=\"107.0\" stroke=\"#dfe1e6\" stroke-width=\"1\" />\n<line x1=\"232.8\" x2=\"232.8\" y1=\"55.0\" y2=\"62.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<text x=\"234.8\" y=\"60.0\" font-size=\"12px\" dominant-baseline=\"bottom\" text-anchor=\"start\" fill=\"#575d6c\" >\n0.6\n </text>\n<line x1=\"232.8\" x2=\"232.8\" y1=\"62.0\" y2=\"107.0\" stroke=\"#dfe1e6\" stroke-width=\"1\" />\n<line x1=\"292.8\" x2=\"292.8\" y1=\"55.0\" y2=\"62.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<text x=\"294.8\" y=\"60.0\" font-size=\"12px\" dominant-baseline=\"bottom\" text-anchor=\"start\" fill=\"#575d6c\" >\n0.8\n </text>\n<line x1=\"292.8\" x2=\"292.8\" y1=\"62.0\" y2=\"107.0\" stroke=\"#dfe1e6\" stroke-width=\"1\" />\n<line x1=\"352.8\" x2=\"352.8\" y1=\"55.0\" y2=\"62.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<text x=\"354.8\" y=\"60.0\" font-size=\"12px\" dominant-baseline=\"bottom\" text-anchor=\"start\" fill=\"#575d6c\" >\n1.0\n </text>\n<line x1=\"352.8\" x2=\"352.8\" y1=\"62.0\" y2=\"107.0\" stroke=\"#dfe1e6\" stroke-width=\"1\" />\n<text x=\"43.8\" y=\"85.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >\n1010\n </text>\n<line x1=\"45.8\" x2=\"52.8\" y1=\"85.0\" y2=\"85.0\" stroke=\"#adb0b8\" stroke-width=\"1\" />\n<rect x=\"52.8\" y=\"73.0\" width=\"300.0\" height=\"24\" id=\"bar_0_1666947948779205936\" fill=\"#5e7ce0\" />\n<text x=\"362.8\" y=\"85.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_0_1666947948779250097\" fill-opacity=\"0\" >\n100\n </text>\n<animate xlink:href=\"#bar_0_1666947948779205936\" attributeName=\"width\" from=\"0\" to=\"300.0\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 300.0\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" />\n<animate xlink:href=\"#bar_0_1666947948779205936\" attributeName=\"fill\" from=\"#5e7ce0\" to=\"#fac209\" dur=\"0.15s\" calcMode=\"spline\" values=\"#5e7ce0; #fac209\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" />\n<animate xlink:href=\"#bar_text_0_1666947948779250097\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" />\n<text x=\"213.9\" y=\"41.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"middle\" >\nprobability\n </text>\n</svg></div>",
      "text/plain": [
       "<mindquantum.io.display.measure_res_svg_drawer.SVGMeasure at 0x7f2ee6af36d0>"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from mindquantum.simulator import Simulator\n",
    "from mindquantum.core.gates import Measure\n",
    "\n",
    "sim = Simulator('mqvector', circ.n_qubits)\n",
    "res = sim.sampling(circ + UN(Measure(), circ.n_qubits), shots=100)\n",
    "res.svg()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### **参考文献：**\n",
    "\n",
    "\\[1\\] L. K. Grover, A fast quantum mechanical algorithm for database search\\[C\\]// Proceedings of the twenty-eighth annual ACM symposium on Theory of computing. ACM, 1996: 212-219.\n",
    "\n",
    "\\[2\\] G. Brassard, P. Hoyer, M. Mosca, et al. Quantum amplitude amplification and estimation\\[J\\]. Contemporary Mathematics, 2002, 305: 53-74.\n",
    "\n",
    "\\[3\\] Long G L. Grover algorithm with zero theoretical failure rate. Physical Rev A, 2001, 64: 022307."
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3.8.8 ('base')",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  },
  "vscode": {
   "interpreter": {
    "hash": "d62cf896b9ca57de08105ce3983377439eacacf6f6599f9150bf400edf4fa4b8"
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
